home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsIPasswordManager.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  7KB  |  199 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIPasswordManager.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIPasswordManager_h__
  6. #define __gen_nsIPasswordManager_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsISimpleEnumerator_h__
  14. #include "nsISimpleEnumerator.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21.  
  22. /* starting interface:    nsIPasswordManager */
  23. #define NS_IPASSWORDMANAGER_IID_STR "173562f0-2173-11d5-a54c-0010a401eb10"
  24.  
  25. #define NS_IPASSWORDMANAGER_IID \
  26.   {0x173562f0, 0x2173, 0x11d5, \
  27.     { 0xa5, 0x4c, 0x00, 0x10, 0xa4, 0x01, 0xeb, 0x10 }}
  28.  
  29. /** 
  30.  * An optional interface for clients accessing or removing
  31.  * logins that were collected by the password manager
  32.  * 
  33.  *
  34.  */
  35. class NS_NO_VTABLE nsIPasswordManager : public nsISupports {
  36.  public: 
  37.  
  38.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPASSWORDMANAGER_IID)
  39.  
  40.   /**
  41.    * Called to add an individual login to the list of saved logins
  42.    *
  43.    * @param aHost The host for which the login is being remembered
  44.    * @param aUser The username portion of the login
  45.    * @param aPassword The password portion of the login
  46.    *
  47.    */
  48.   /* void addUser (in AUTF8String aHost, in AString aUser, in AString aPassword); */
  49.   NS_IMETHOD AddUser(const nsACString & aHost, const nsAString & aUser, const nsAString & aPassword) = 0;
  50.  
  51.   /**
  52.    * Called to remove an individual login from the list of save logins
  53.    *
  54.    * @param aHost The host for which the login is being remembered
  55.    * @param aUser The username portion of the login
  56.    *
  57.    */
  58.   /* void removeUser (in AUTF8String aHost, in AString aUser); */
  59.   NS_IMETHOD RemoveUser(const nsACString & aHost, const nsAString & aUser) = 0;
  60.  
  61.   /**
  62.    * Called to add a host to the list of rejected hosts -- i.e., hosts for which
  63.    * the do-you-want-to-save dialog does appear
  64.    *
  65.    * @param aHost The host for which the dialog is to not appear
  66.    *
  67.    */
  68.   /* void addReject (in AUTF8String aHost); */
  69.   NS_IMETHOD AddReject(const nsACString & aHost) = 0;
  70.  
  71.   /**
  72.    * Called to remove a host from the list of rejected hosts -- i.e., hosts for which
  73.    * the do-you-want-to-save dialog does not appear
  74.    *
  75.    * @param aHost The host for which the dialog is to not appear
  76.    *
  77.    */
  78.   /* void removeReject (in AUTF8String aHost); */
  79.   NS_IMETHOD RemoveReject(const nsACString & aHost) = 0;
  80.  
  81.   /**
  82.    * Called to enumerate through each login in the password-manager list
  83.    * The objects enumerated over are of type nsIPassword
  84.    */
  85.   /* readonly attribute nsISimpleEnumerator enumerator; */
  86.   NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) = 0;
  87.  
  88.   /**
  89.    * Called to enumerate through each rejected site in the password-manager list
  90.    * These are sites for which the user has indicated that he doesn't want passwords saved.
  91.    * The objects enumerated over are of type nsIPassword, although the only member of
  92.    * that object that is relevent is the host (the user and password members are ignored).
  93.    */
  94.   /* readonly attribute nsISimpleEnumerator rejectEnumerator; */
  95.   NS_IMETHOD GetRejectEnumerator(nsISimpleEnumerator * *aRejectEnumerator) = 0;
  96.  
  97. };
  98.  
  99. /* Use this macro when declaring classes that implement this interface. */
  100. #define NS_DECL_NSIPASSWORDMANAGER \
  101.   NS_IMETHOD AddUser(const nsACString & aHost, const nsAString & aUser, const nsAString & aPassword); \
  102.   NS_IMETHOD RemoveUser(const nsACString & aHost, const nsAString & aUser); \
  103.   NS_IMETHOD AddReject(const nsACString & aHost); \
  104.   NS_IMETHOD RemoveReject(const nsACString & aHost); \
  105.   NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator); \
  106.   NS_IMETHOD GetRejectEnumerator(nsISimpleEnumerator * *aRejectEnumerator); 
  107.  
  108. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  109. #define NS_FORWARD_NSIPASSWORDMANAGER(_to) \
  110.   NS_IMETHOD AddUser(const nsACString & aHost, const nsAString & aUser, const nsAString & aPassword) { return _to AddUser(aHost, aUser, aPassword); } \
  111.   NS_IMETHOD RemoveUser(const nsACString & aHost, const nsAString & aUser) { return _to RemoveUser(aHost, aUser); } \
  112.   NS_IMETHOD AddReject(const nsACString & aHost) { return _to AddReject(aHost); } \
  113.   NS_IMETHOD RemoveReject(const nsACString & aHost) { return _to RemoveReject(aHost); } \
  114.   NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) { return _to GetEnumerator(aEnumerator); } \
  115.   NS_IMETHOD GetRejectEnumerator(nsISimpleEnumerator * *aRejectEnumerator) { return _to GetRejectEnumerator(aRejectEnumerator); } 
  116.  
  117. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  118. #define NS_FORWARD_SAFE_NSIPASSWORDMANAGER(_to) \
  119.   NS_IMETHOD AddUser(const nsACString & aHost, const nsAString & aUser, const nsAString & aPassword) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddUser(aHost, aUser, aPassword); } \
  120.   NS_IMETHOD RemoveUser(const nsACString & aHost, const nsAString & aUser) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveUser(aHost, aUser); } \
  121.   NS_IMETHOD AddReject(const nsACString & aHost) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddReject(aHost); } \
  122.   NS_IMETHOD RemoveReject(const nsACString & aHost) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveReject(aHost); } \
  123.   NS_IMETHOD GetEnumerator(nsISimpleEnumerator * *aEnumerator) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEnumerator(aEnumerator); } \
  124.   NS_IMETHOD GetRejectEnumerator(nsISimpleEnumerator * *aRejectEnumerator) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRejectEnumerator(aRejectEnumerator); } 
  125.  
  126. #if 0
  127. /* Use the code below as a template for the implementation class for this interface. */
  128.  
  129. /* Header file */
  130. class nsPasswordManager : public nsIPasswordManager
  131. {
  132. public:
  133.   NS_DECL_ISUPPORTS
  134.   NS_DECL_NSIPASSWORDMANAGER
  135.  
  136.   nsPasswordManager();
  137.  
  138. private:
  139.   ~nsPasswordManager();
  140.  
  141. protected:
  142.   /* additional members */
  143. };
  144.  
  145. /* Implementation file */
  146. NS_IMPL_ISUPPORTS1(nsPasswordManager, nsIPasswordManager)
  147.  
  148. nsPasswordManager::nsPasswordManager()
  149. {
  150.   /* member initializers and constructor code */
  151. }
  152.  
  153. nsPasswordManager::~nsPasswordManager()
  154. {
  155.   /* destructor code */
  156. }
  157.  
  158. /* void addUser (in AUTF8String aHost, in AString aUser, in AString aPassword); */
  159. NS_IMETHODIMP nsPasswordManager::AddUser(const nsACString & aHost, const nsAString & aUser, const nsAString & aPassword)
  160. {
  161.     return NS_ERROR_NOT_IMPLEMENTED;
  162. }
  163.  
  164. /* void removeUser (in AUTF8String aHost, in AString aUser); */
  165. NS_IMETHODIMP nsPasswordManager::RemoveUser(const nsACString & aHost, const nsAString & aUser)
  166. {
  167.     return NS_ERROR_NOT_IMPLEMENTED;
  168. }
  169.  
  170. /* void addReject (in AUTF8String aHost); */
  171. NS_IMETHODIMP nsPasswordManager::AddReject(const nsACString & aHost)
  172. {
  173.     return NS_ERROR_NOT_IMPLEMENTED;
  174. }
  175.  
  176. /* void removeReject (in AUTF8String aHost); */
  177. NS_IMETHODIMP nsPasswordManager::RemoveReject(const nsACString & aHost)
  178. {
  179.     return NS_ERROR_NOT_IMPLEMENTED;
  180. }
  181.  
  182. /* readonly attribute nsISimpleEnumerator enumerator; */
  183. NS_IMETHODIMP nsPasswordManager::GetEnumerator(nsISimpleEnumerator * *aEnumerator)
  184. {
  185.     return NS_ERROR_NOT_IMPLEMENTED;
  186. }
  187.  
  188. /* readonly attribute nsISimpleEnumerator rejectEnumerator; */
  189. NS_IMETHODIMP nsPasswordManager::GetRejectEnumerator(nsISimpleEnumerator * *aRejectEnumerator)
  190. {
  191.     return NS_ERROR_NOT_IMPLEMENTED;
  192. }
  193.  
  194. /* End of implementation class template. */
  195. #endif
  196.  
  197.  
  198. #endif /* __gen_nsIPasswordManager_h__ */
  199.